import { DefaultTheme } from 'vitepress'

export const navList: DefaultTheme.NavItem[] = [
  { text: 'BOOK', link: '/book/' },
  { text: 'HTML', link: '/html/' },
  { text: 'CSS', link: '/css/' },
  { text: 'JAVASCRIPT', link: '/javascript/' },
  { text: 'TYPESCRIPT', link: '/typescript/' },
  { text: 'VUE', link: '/vue/' },
  { text: 'OTHER', link: '/other/' },
]

export const sideBarObj: DefaultTheme.Sidebar = {
  '/book/': [
    {
      text: 'BOOK',
      collapsed: true,
      items: [
        { text: '书籍', link: '/book/' }
      ]
    }
  ],
  '/html/': [
    {
      text: 'HTML',
      collapsed: true,
      items: [
        { text: '介绍', link: '/html/' },
        { text: '子菜单', collapsed: true, items: [
            { text: 'test', link: '/html/test' }
          ]
        }
      ]
    }
  ],
  '/css/': [
    {
      text: 'CSS',
      collapsed: true,
      items: [
        { text: '介绍', link: '/css/' },
        { text: '篇二', link: '/css/index2' },
        { text: '篇三', link: '/css/index3' },
        { text: 'loading', link: '/css/loading' },
        { text: 'grid', link: '/css/grid' },
        { text: '动画时间轴', link: '/css/timeline' },
        { text: 'CSS实现图标', link: '/css/icon' },
      ]
    }
  ],
  '/javascript/': [
    {
      text: 'JAVASCRIPT',
      collapsed: true,
      items: [
        { text: '介绍', link: '/javascript/' },
        { text: '介绍二', link: '/javascript/index2' },
        { text: 'copyText复制文本', link: '/javascript/copyText复制文本' },
        { text: '数组copyWithin', link: '/javascript/数组copyWithin' },
        { text: '自定义日期', link: '/javascript/自定义日期' },
        { text: '数组平铺', link: '/javascript/数组平铺' },
        { text: 'indexDB', link: '/javascript/indexDB' },
        { text: 'Canvas', link: '/javascript/Canvas' },
        { text: 'PerformanceObserver', link: '/javascript/performance' },
        { text: 'svg', link: '/javascript/svg' },
        { text: 'WebRTC', link: '/javascript/WebRTC' },
        { text: '流式数据', link: '/javascript/流式数据' },
        { text: 'Tiptap编辑器', link: '/javascript/Tiptap' },
      ]
    }
  ],
  '/typescript/': [
    {
      text: 'TYPESCRIPT',
      collapsed: true,
      items: [
        { text: '介绍', link: '/typescript/' }
      ]
    }
  ],
  '/vue/': [
    {
      text: 'VUE',
      collapsed: true,
      items: [
        { text: '介绍', link: '/vue/' },
        { text: 'vue2-UI封装', link: '/vue/vue2' },
        { text: 'vue2项目构建工具迁移', link: '/vue/bundle' },
        { text: 'vue项目路由后退', link: '/vue/router-back' },
      ]
    }
  ],
  '/other/': [
    {
      text: 'OTHER',
      collapsed: true,
      items: [
        { text: '介绍', link: '/other/' },
        { text: 'xMind', link: '/other/xMind' },
        { text: '作用域', link: '/other/作用域' },
        { text: 'ag-grid-vue', link: '/other/ag-grid' },
        { text: '脚手架', link: '/other/my-cli' },
        { text: 'jenkins', link: '/other/jenkins' },
        { text: 'three', link: '/other/three' },
        { text: 'nginx', link: '/other/nginx' },
        { text: 'network', link: '/other/network' },
        { text: 'pwa', link: '/other/pwa' },
        { text: 'chrome-extension', link: '/other/chrome-extension' },
        { text: '原子化CSS', link: '/other/uno' },
        { text: 'koa2', link: '/other/koa' },
        { text: 'tile', link: '/other/tile' },
        { text: 'SSO', link: '/other/sso' },
        { text: '微前端', link: '/other/micro-frontend' },
      ]
    }
  ],
}
